home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / tuning / download / xteq / setup.exe / {app} / plugins / XQ Win2K Phantom Devs.xpl < prev    next >
Text File  |  2001-04-17  |  2KB  |  66 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="1"
  4. "UIPATH"="Hardware\System Settings"
  5. "NAME"="Windows 2K Phantom Devices"
  6. "OSVERSION"="000101"
  7. "VERSION"="1.03"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Show phantom devices"
  10. "DESCRIPTION 1"="By default, the Device Manager (devmgmt.msc) does not show so called "Phantom Devices" (Devices that have drivers installed but are currently not connected to the system)."
  11. "DESCRIPTION 2"="By activating this option, the Device Manager will also show "Phantom Devices"."
  12. "AUTHOR"="Xteq Systems"
  13. "CONTACTURL"="http://www.xteq.com"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"=""
  16.  
  17.  
  18. 'Declaration of some constants
  19. sF="C:\AUTOEXEC.BAT"
  20. sV1="SET DEVMGR_SHOW_NONPRESENT_DEVICES="
  21.  
  22.  
  23. 'Called when the Plugin is started
  24. Sub Plugin_Initialize
  25.  Call FileSetAttribute(sF,"R-")
  26.  Call FileSetAttribute(sF,"H-")
  27.  
  28.  TxtOpen(sF)
  29.  
  30.  i=TxtFindLine(sV1,false) 'search for string, ignoring case
  31.  if i>0 then
  32.     s=TxtGetLine(i)
  33.     'strip out the part after the "="
  34.     i=InStr(s,"=")      'find where "=" appears
  35.     s=Right(s,len(s)-i) 'extract the part after the "="
  36.     s=trim(s)
  37.     
  38.     if s="1" then SetUIElement 1,true
  39.  end if     
  40. End Sub
  41.  
  42.  
  43. 'Called when the Plugin should apply the changes
  44. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  45.  if GetUIElement(1)=true then
  46.     s="1"
  47.  else
  48.     s="0"
  49.  end if
  50.  
  51.  
  52.  
  53.  i=TxtFindLine(sV1,false) 'search for text, ignoring case
  54.  Call TxtSetLine(i,sV1 & s) 'write to file
  55.  
  56.  Call FileBackup(sF) 'backup file
  57.  Call TxtSave() 'save file
  58.  Call Restart()
  59. End Sub
  60.  
  61. 'Called when the Plugin is about to be removed from memory
  62. Sub Plugin_Terminate
  63.  'Call FileSetAttribute(sF,"H+")
  64. End Sub
  65.  
  66.